package fragments;


import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.qozix.tileview.TileView;

import fragments.FragmentBase.TileViewFragment;

/**
 * Created by Administrator on 2014/12/1.
 */
public class HomeFragment extends TileViewFragment {


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        super.onCreateView(inflater,container,savedInstanceState);

        TileView tileView = getTileView();

        tileView.setSize(4096,4096);

        tileView.addDetailLevel(0.125f,"tiles/125/%col%_%row%.jpg","map/map.jpg");

        tileView.addDetailLevel(0.250f,"tiles/250/%col%_%row%.jpg","map/map.jpg");

        tileView.addDetailLevel(0.500f,"tiles/500/%col%_%row%.jpg","map/map.jpg");

        tileView.addDetailLevel(1.000f,"tiles/1000/%col%_%row%.jpg","map/map.jpg");


        tileView.setMarkerAnchorPoints(-0.5f,-1.0f);
        tileView.setScaleLimits(0,2);
        tileView.setTransitionsEnabled( false );

        tileView.setScale( 0.5 );

        frameTo( 2048, 2048 );

        return tileView;

    }


}
